package com.Entity;

import static javax.persistence.GenerationType.IDENTITY;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * Orders entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "orders", catalog = "monitor")
public class Orders implements java.io.Serializable {

	// Fields

	private Integer orderId;
	private Integer userId;
	private short userType;
	private Integer dataId;
	private Integer motherId;
	private String orderContent;
	private Date orderUploadTime;
	private short dataReadState;

	// Constructors

	/** default constructor */
	public Orders() {
	}

	/** minimal constructor */
	public Orders(Integer userId, short userType, Integer dataId,
			Integer motherId ) {
		this.userId = userId;
		this.userType = userType;
		this.dataId = dataId;
		this.motherId = motherId;
	}

	/** full constructor */
	public Orders(Integer userId, short userType, Integer dataId,
			Integer motherId, String orderContent,
			Date orderUploadTime, short dataReadState) {
		this.userId = userId;
		this.userType = userType;
		this.dataId = dataId;
		this.motherId = motherId;
		this.orderContent = orderContent;
		this.orderUploadTime = orderUploadTime;
		this.dataReadState = dataReadState;
	}


	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "OrderID", unique = true, nullable = false)
	public Integer getOrderId() {
		return this.orderId;
	}

	public void setOrderId(Integer orderId) {
		this.orderId = orderId;
	}

	@Column(name = "UserID")
	public Integer getUserId() {
		return this.userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	@Column(name = "UserType")
	public short getUserType() {
		return this.userType;
	}

	public void setUserType(short userType) {
		this.userType = userType;
	}

	@Column(name = "DataID")
	public Integer getDataId() {
		return this.dataId;
	}

	public void setDataId(Integer dataId) {
		this.dataId = dataId;
	}

	@Column(name = "MotherID")
	public Integer getMotherId() {
		return this.motherId;
	}

	public void setMotherId(Integer motherId) {
		this.motherId = motherId;
	}	

	@Column(name = "OrderContent", length = 4000)
	public String getOrderContent() {
		return this.orderContent;
	}

	public void setOrderContent(String orderContent) {
		this.orderContent = orderContent;
	}

	@Column(name = "OrderUploadTime")
	public Date getOrderUploadTime() {
		return this.orderUploadTime;
	}

	public void setOrderUploadTime(Date orderUploadTime) {
		this.orderUploadTime = orderUploadTime;
	}

	@Column(name = "DataReadState")
	public short getDataReadState() {
		return this.dataReadState;
	}

	public void setDataReadState(short dataReadState) {
		this.dataReadState = dataReadState;
	}
}